package cn.kow.kmall;

import cn.kow.kmall.core.jpa.KmallJpaRepository;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.web.client.RestTemplate;

@EnableJpaRepositories(basePackages = {"cn.kow.kmall.core.jpa", "cn.kow.kmall.dao" }, repositoryBaseClass = KmallJpaRepository.class)
@SpringBootApplication
public class KmallApiApplication {

    public static void main(String[] args) {
        SpringApplication.run(KmallApiApplication.class, args);
    }

    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
